﻿
using Nop.Core;
using Nop.Core.Domain.Customers;
using Nop.Core.Domain.WindAlert;
using System;
using System.Collections.Generic;


namespace Nop.Services.WindAlert
{
    /// <summary>
    /// Wins spot service
    /// </summary>
    public partial interface ISpotService
    {
        /// <summary>
        /// Deletes a spot
        /// </summary>
        /// <param name="store">Store</param>
        void DeleteSpot(Spot spot );

        
        /// <summary>
        /// Gets all spots
        /// </summary>
        /// <param name="showHidden">A value indicating whether to show hidden records</param>
        /// <returns>Spots collection</returns>
        IList<Spot> GetAllSpots(bool showHidden = false, bool isForecast = false, bool isWave = false,
            bool isStation = false, bool isMetar = false, bool showOnHome = false, bool showOnAviasion = false);

        /// <summary>
        /// Gets all spots
        /// </summary>
        /// <param name="pageIndex">Page index</param>
        /// <param name="pageSize">Page size</param>
        /// <param name="showHidden">A value indicating whether to show hidden records</param>
        /// <returns>Stores</returns>
        IPagedList<Spot> GetAllSpots(int pageIndex, int pageSize,
            bool showHidden = false, bool isForecast = false, bool isWave = false, bool isStation = false,
            bool isMetar = false, bool showOnHome = false, bool showOnAviasion = false);

        /// <summary>
        /// Gets a spot
        /// </summary>
        /// <param name="storeId">Store identifier</param>
        /// <returns>Store</returns>
        Spot GetSpotById(int spotId);

        /// <summary>
        /// Inserts a spot
        /// </summary>
        /// <param name="store">Store</param>
        void InsertSpot(Spot spot);

        /// <summary>
        /// Updates the spot
        /// </summary>
        /// <param name="store">Spot</param>
        void UpdateSpot(Spot spot);


        #region Comments
        /// <summary>
        /// Gets all comments
        /// </summary>
        /// <param name="dateFrom">Filter by created date; null if you want to get all records</param>
        /// <param name="dateTo">Filter by created date; null if you want to get all records</param>
        /// <param name="customerId">Customer identifier; 0 to load all records</param>
        /// <returns>Comments</returns>
        IList<SpotComment> GetAllComments(int spotId, int customerId, DateTime? dateFrom, DateTime? dateTo);

        /// <summary>
        /// Gets a spot comment
        /// </summary>
        /// <param name="spotCommentId">Spot comment identifier</param>
        /// <returns>Spot comment</returns>
        SpotComment GetSpotCommentById(int spotCommentId);

        /// <summary>
        /// Deletes a spot comment
        /// </summary>
        /// <param name="spotComment">Spot comment</param>
        void DeleteSpotComment(SpotComment spotComment);

        /// <summary>
        /// Check whether customer is allowed to edit comment
        /// </summary>
        /// <param name="customer">Customer</param>
        /// <param name="comment">Topic</param>
        /// <returns>True if allowed, otherwise false</returns>
        bool IsCustomerAllowedToEditDeleteComment(Customer customer, SpotComment comment);
        
        #endregion

    }
}
